package com.openbravo.data.gui;

import com.openbravo.format.Formats;
import java.awt.Component;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;

public class TableRendererBasic extends DefaultTableCellRenderer
{
  private Formats[] m_aFormats;

  public TableRendererBasic(Formats[] paramArrayOfFormats)
  {
    this.m_aFormats = paramArrayOfFormats;
  }

  public Component getTableCellRendererComponent(JTable paramJTable, Object paramObject, boolean paramBoolean1, boolean paramBoolean2, int paramInt1, int paramInt2)
  {
    JLabel localJLabel = (JLabel)super.getTableCellRendererComponent(paramJTable, null, paramBoolean1, paramBoolean2, paramInt1, paramInt2);
    localJLabel.setText(this.m_aFormats[paramInt2].formatValue(paramObject));
    localJLabel.setHorizontalAlignment(this.m_aFormats[paramInt2].getAlignment());
    return localJLabel;
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.data.gui.TableRendererBasic
 * JD-Core Version:    0.6.0
 */